package project.menu.garagemenu;

import project.controllers.Controller;
import project.menu.IMenu;
import project.menu.IMenuItem;
import project.work.Navigator;
import controllers.IAutoservice;

public class RemoverGarage implements IMenuItem{

	private String name = "Delete garage";
	private final Integer id= 5;
	private static IMenu submenu;
	private Controller con;
	private Navigator n;
	
	public RemoverGarage(){
		con= Controller.getInstance();
		n=Navigator.getInstance();
	}


	
	public static void setSubmenu(IMenu menu){
		 submenu=menu;
	}
	
	public void action(IAutoservice aut) {
		//delete garage	
		aut.deleteGarage(con.getNumberGarage());
		n.drawMenu(submenu);
	}


	public String getNameItem() {
		
		return name;
	}
	
	public Integer getId(){
		return id;
	}

}
